<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<jsp:include page="/WEB-INF/pages/admin/public/meta.jsp"></jsp:include>
<title>区域图</title>
</head>
<body>
<nav class="breadcrumb"><i class="Hui-iconfont">&#xe67f;</i> 首页 <span class="c-gray en">&gt;</span> 统计管理 <span class="c-gray en">&gt;</span> 区域图 <a class="btn btn-success radius r" style="line-height:1.6em;margin-top:3px" href="javascript:location.replace(location.href);" title="刷新" ><i class="Hui-iconfont">&#xe68f;</i></a></nav>
<div class="page-container">
	
	<div id="container" style="min-width:700px;height:600px"></div>
</div>
<!--_footer 作为公共模版分离出去-->
<jsp:include page="/WEB-INF/pages/admin/public/footer.jsp"></jsp:include>
 <!--/_footer 作为公共模版分离出去-->

<!--请在下方写此页面业务相关的脚本-->
<script type="text/javascript" src="admin/lib/hcharts/Highcharts/5.0.6/js/highcharts.js"></script>
<script type="text/javascript" src="admin/lib/hcharts/Highcharts/5.0.6/js/modules/exporting.js"></script>
<script type="text/javascript" src="admin/lib/echarts/3.4.0/echarts.min.js"></script>
<script type="text/javascript">
showCharts();
function showCharts() {  
	 var myChart = echarts.init(document.getElementById('container'));
	 option = {
			    title: {
			        text: '交易额度统计'
			    },
			    tooltip : {
			        trigger: 'axis',
			        axisPointer: {
			            type: 'cross',
			            label: {
			                backgroundColor: '#6a7985'
			            }
			        }
			    },
			    legend: {
			        data:['交易额度统计']
			    },
			    toolbox: {
			        feature: {
			            saveAsImage: {}
			        }
			    },
			    grid: {
			        left: '3%',
			        right: '4%',
			        bottom: '3%',
			        containLabel: true
			    },
			    xAxis : [
			        {
			            type : 'category',
			            boundaryGap : false,
			            data: ['一月','二月','三月','四月','五月','六月','七月','八月','九月','十月','十一月','十二月']
			        }
			    ],
			    yAxis : [
			        {
			            type : 'value'
			        }
			    ],
			    series : [
			        {
			            name:'交易额度',
			            type:'line',
			            stack: '总量',
			            label: {
			                normal: {
			                    show: true,
			                    position: 'top'
			                }
			            },
			            areaStyle: {normal: {}},
			            data:(function() {
                            var count = [];
                            $.ajax({
                                        async : false, //这句必须加
                                        method : 'post',
                                        url : 'countMoneyData.action',
                                        dataType : "json",
                                        success : function(data) {
                                        	for (var i = 0; i < data.length; i++) {
												count.push(data[i]);
											}
                                        },
                            			error:function(){
                            				alert('失败');
                            			}
                                    });
                            return count;
                        })()
			        }
			    ]
			};
	 	// 使用刚指定的配置项和数据显示图表。
	 	myChart.setOption(option); 
// 	 	window.onresize = myChart.resize;
}
</script>
</body>
</html>